home *** CD-ROM | disk | FTP | other *** search
/ Programming in Microsoft Windows with C# / Programacion en Microsoft Windows con C#.iso / Codigo / Introducción a Windows Forms / HelloWorld / HelloWorld.cs next >
Encoding:
Text File  |  2002-05-02  |  632 b   |  25 lines

  1. //-----------------------------------------
  2. // HelloWorld.cs ⌐ 2001 by Charles Petzold
  3. //-----------------------------------------
  4. using System;
  5. using System.Drawing;
  6. using System.Windows.Forms;
  7.  
  8. class HelloWorld: Form
  9. {
  10.      public static void Main()
  11.      {
  12.           Application.Run(new HelloWorld());
  13.      }
  14.      public HelloWorld()
  15.      {
  16.           Text = "Hola Mundo";
  17.           BackColor = Color.White;
  18.      }
  19.      protected override void OnPaint(PaintEventArgs pea)
  20.      {
  21.           Graphics grfx = pea.Graphics;
  22.  
  23.           grfx.DrawString("íHola, Windows Forms!", Font, Brushes.Black, 0, 0);
  24.      }
  25. }